package com.situ.report.controller;

import com.situ.report.entity.gx;
import com.situ.report.service.GxService;
import com.situ.util.ResponseData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class Gxcontroller {
    @Autowired
    GxService service;

    @RequestMapping("querygx")
    public ResponseData querygx(gx g){
        return ResponseData.ok().putDataValue("list", service.queryall(g));
    }

    @RequestMapping("queryyear")
    public ResponseData queryyears(){
        List<gx> queryyesr = service.queryyesr();
        return ResponseData.ok().putDataValue("yearlist", queryyesr);
    }
}
